<template>
	<view>
		<view class="results_top">
			<view><image src="../../static/img/results.png" mode="widthFix"></image></view>
			<view>成绩:80</view>
		</view>
		<u-gap height="20" bg-color="#f2f2f2"></u-gap>
		<view class="radioTitle">
			<view class="title">单选题</view>
			<view class="Title_body">
				<block v-for="(item,index) in daxList" :key='index'>
					<view :class="item.isanswer?'dz':'nodz'">{{item.index+1}}</view>
				</block>
			</view>
		</view>
		<view class="radioTitle">
			<view class="title">多选题</view>
			<view class="Title_body">
				<block v-for="(item,index) in duxList" :key='index'>
					<view :class="item.isanswer?'dz':'nodz'">{{item.index+1}}</view>
				</block>
			</view>
		</view>
		<view class="radioTitle" style="padding-bottom: 150rpx;">
			<view class="title">判断题</view>
			<view class="Title_body">
				<block v-for="(item,index) in pandList" :key='index'>
					<view :class="item.isanswer?'dz':'nodz'">{{item.index+1}}</view>
				</block>
			</view>
		</view>
		<view class="btnCaptchaList">
			<view @click="wrongTopic">查看我的错题</view>
			<view @click="thisList">返回考证列表</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				daxList:[],
				duxList:[],
				pandList:[]
			};
		},
		onLoad(option) {
			console.log(option)
			this.duxList = JSON.parse(option.dux);
			this.daxList = JSON.parse(option.dax);
			this.pandList = JSON.parse(option.pd);
			console.log(this.pdList.length)
		},
		methods:{
			wrongTopic(){
				uni.navigateTo({
					url:'./myWrongTitle'
				})
			},
			thisList(){
				uni.switchTab({
					url:'../learn/index'
				})
			}
		}
	}
</script>

<style lang="scss">
.results_top{
	>view{
		display: flex;
		align-items: center;
		justify-content: center;
		&:nth-child(1){
			padding: 30rpx;
			>image{
				width: 150rpx;
			}
		}
		&:nth-child(2){
			font-weight: 600;
			padding-bottom: 30rpx;
			font-size: 50rpx;
		}
	}
}
.Title_body{
	padding: 20rpx 20rpx;
	>view{
		height: 80rpx;
		width: 80rpx;
		display: inline-block;
		line-height: 80rpx;
		text-align: center;
		color: #fff;
		font-size: 35rpx;
		margin: 10rpx;
	}
}
.title{
	font-size: 30rpx;
	padding: 40rpx 20rpx 20rpx 20rpx;
	border-bottom: 1rpx solid #eee;
}
.btnCaptchaList{
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-top: 1rpx solid #EEEEEE;
	>view{
		padding: 40rpx;
		flex: 1;
		text-align: center;
		font-size: 30rpx;
		background: #fff;
		&:nth-child(2){
			color: #fff;
			background: #7167fc;
		}
	}
}
.dz{
	background: #0AC8CB;
}
.nodz{
	background: #FF9477;
}
</style>
